﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SistemaComprasVentaYICHAN
{
    public partial class AgregarProvDLG : Form
    {
        public AgregarProvDLG()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text != "" && this.textBox2.Text != "" && this.textBox3.Text != "" && this.textBox4.Text != "" && this.textBox5.Text != "" && this.textBox6.Text != "" && this.textBox7.Text != "" && this.textBox8.Text != "" && this.textBox9.Text != "" && this.textBox10.Text != "" && this.textBox11.Text != "" && this.comboBox1.Text != "")
            {
                GestorProveedor gP = GestorProveedor.getInstance;
                gP.AgregarProveedor(this.textBox1.Text, this.textBox2.Text, this.textBox8.Text, this.textBox9.Text, this.textBox3.Text, this.textBox4.Text, this.textBox5.Text, this.textBox6.Text, this.textBox7.Text, this.comboBox1.Text, this.textBox10.Text, this.textBox11.Text);
                MessageBox.Show("se agrego correctamente");
                this.Close();
            }
            else
            {
                MessageBox.Show("El ingreso de todos los campos es obligatorio");
            }
        }

        private void AgregarProvDLG_Load(object sender, EventArgs e)
        {

        }

        private void AgregarProvDLG_Load_1(object sender, EventArgs e)
        {

        }
    }
}
